<cfcomponent name="InstanceFactory" output="false">
	<cffunction name="getBean" output="false" access="public" returntype="any" hint="I return an instance object">
		<cfargument name="ObjectName" type="string" required="true"/>
		
		<cftry>
		 	<cfreturn createObject( "component", structFind(getConfig(), arguments.ObjectName )  ).init() />
		
 			<cfcatch type="any">
				<cfthrow message="BAD_OBJECT_CONFIG_IN_INSTANCEFACTORY" detail="You provided [ #arguments.ObjectName # ] and I can't create it. Go check the config." />
			</cfcatch>
		</cftry>

	</cffunction>
</cfcomponent>